package com.twu.biblioteca.menus;

import com.twu.biblioteca.InputController;
import com.twu.biblioteca.OutputController;

import java.io.IOException;
import java.util.List;

public class MainMenu implements Menu{

    private final List<String> options;
    private final OutputController outputController;
    private final InputController inputController;
    private int nextMenu;

    public MainMenu(List<String> options, OutputController outputController, InputController inputController) {
        this.options = options;
        this.outputController = outputController;
        this.inputController = inputController;
    }

    public void displayMenu() {
        outputController.drawOptions(options);
    }


    public void runCommand() {
    }

    public void getInput() throws IOException {
        nextMenu = inputController.readOption(options.size());
    }

    public int getNextMenu() {
        return nextMenu;
    }

    @Override
    public boolean mustBeLoggedIn() {
        return false;
    }


}
